package com.dong.design.factory.abstract_;

import com.dong.design.factory.Shape;

/**
 * @author jianyang206881
 * @date 2018/6/7
 */
public class ColorFactory extends AbstractFactory {

    @Override
    public Color getColor(String colorType) {
        switch (colorType) {
            case "red":
                return new Red();
            case "green":
                return new Green();
            case "blue":
                return new Blue();
            default:
                return null;
        }
    }

    @Override
    public Shape getShape(String shapeType) {
        return null;
    }
}
